﻿using JinfuyuanProject.Entity;

using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Data.Entity.ModelConfiguration.Conventions;
using System.Linq;
using System.Security.Permissions;
using System.Text;
using System.Threading.Tasks;

namespace JinfuyuanProject.Entity
{
    public class JinfuyuanDbContext : DbContext
    {
        public JinfuyuanDbContext()
          : base("Jinfuyuan2025")
        {
            Database.SetInitializer<JinfuyuanDbContext>(null);
        }
        public DbSet<Parturient> Parturient { get; set; }
        public DbSet<Baby> Baby { get; set; }
        public DbSet<Salary> Salary { get; set; }
        public DbSet<MessageInfo> MessageInfo { get; set; }
        public DbSet<Home> Home { get; set; }
        public DbSet<Contract> Contract { get; set; }
        public DbSet<Package> Package { get; set; }
        public DbSet<Entry> Entry { get; set; }
        public DbSet<Export> Export { get; set; }
        public DbSet<Product> Product { get; set; }
        public DbSet<Procurements> Procurements { get; set; }
        public DbSet<Inbound> Inbound { get; set; }
        public DbSet<Outbound> Outbound { get; set; }
        public DbSet<ProductApplication> ProductApplication { get; set; }

        public DbSet<SalaryDetails> SalaryDetails { get; set; }
        public DbSet<ExpenseRecord> ExpenseRecord { get; set; }
        public DbSet<PackageServices> PackageServices { get; set; }
        public DbSet<Services> Services { get; set; }
        public DbSet<ServiceDo> ServiceDo { get; set; }
        public DbSet<Attendance> Attendance { get; set; }
        public DbSet<Modules> Modules { get; set; }
        public DbSet<Pages> Pages { get; set; }
        public DbSet<Role> Role { get; set; }
        public DbSet<RoleAndPage> RoleAndPage { get; set; }
        public DbSet<Staff> Staff { get; set; }
        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            base.OnModelCreating(modelBuilder);
            // 禁用复数化
            modelBuilder.Conventions.Remove<PluralizingTableNameConvention>();
        }

    }
}